package ru.tulupov.collectionsbenchmark.util;

import ru.tulupov.collectionsbenchmark.model.Car;

public class CarBuilder {

	public Car build(String[] data) {
		if (data.length < 3) {
			throw new IllegalArgumentException();
		}

		String name = data[0].trim();
		int width = Integer.parseInt(data[1].trim());
		int height = Integer.parseInt(data[2].trim());

		return new Car(name, width, height);
	}
}
